﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="Manager_lm_default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>栏目管理</title>
    <link href="../../Style/css/fontCss.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" runat="server" />
    <ext:Panel ID="Panel1" runat="server" BodyPadding="5px" EnableLargeHeader="false"
        EnableBackgroundColor="true" ShowBorder="true" ShowHeader="true" Layout="Container" BoxConfigAlign="Top"  AutoHeight="true" Title="栏目设置">
        <Items>
            <ext:Form ID="Form2" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false"
                ShowBorder="false" EnableBackgroundColor="true">
                <Rows>
                    <ext:FormRow ID="FormRow1" runat="server">
                        <Items>
                            <ext:TextBox ID="txtkeyword" MaxLength="20" EmptyText="关键字" runat="server" Label="栏目名称" Text="">
                            </ext:TextBox>
                            <ext:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click">
                            </ext:Button>
                        </Items>
                    </ext:FormRow>
                </Rows>
            </ext:Form>
            <ext:Grid ID="Grid1" runat="server" EnableCheckBoxSelect="false"  AutoHeight="true" EnableRowNumber="false"
                ShowHeader="false" DataKeyNames="ID" OnRowCommand="Grid1_RowCommand">
                <Toolbars>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <ext:Button ID="btnNew" runat="server" Icon="Add" EnablePostBack="false" Text="新增栏目">
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </Toolbars>
                <columns>
                <ext:TemplateField  Width="200px" HeaderText="所属栏目" >
                <ItemTemplate >
                <%#GetlmNameById(int.Parse(Eval("ParentID").ToString()))%>
                </ItemTemplate>
                </ext:TemplateField>
                <ext:BoundField DataField="TName" SortField="TName"  ExpandUnusedSpace="true" HeaderText="栏目名称" />
                <ext:WindowField Text="编辑" WindowID="Window1" Title="编辑"  HeaderText="编辑" DataIFrameUrlFields="ID"
                        DataIFrameUrlFormatString="Edit.aspx?ID={0}" Width="50px" />
                    <ext:LinkButtonField Text="删除" ConfirmText="确定删除此栏目？" HeaderText="删除"  ConfirmTarget="Top" CommandName="Delete"
                        Width="50px" />
                </columns>
            </ext:Grid>
        </Items>
    </ext:Panel>
    <ext:Window ID="Window1" runat="server" IsModal="true" Hidden="true" Target="Parent"
        EnableIFrame="true" IFrameUrl="about:blank" Width="600px" Height="400px" OnClose="Window1_Close">
    </ext:Window>
    </form>
</body>
</html>
